home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / disk / vf512.zip / SX.BTM < prev    next >
Text File  |  1996-12-15  |  5KB  |  171 lines

  1. @echo off
  2. rem Checks for 4DOS if renamed to BAT
  3. if Not %@eval[2+2]==4 goto err4
  4. setlocal
  5. loadbtm on
  6. on break (echo *** Ctrl+Breaked^quit 1)
  7.  
  8. rem *** FSX AAL by (c) VBS Cade 1995
  9. rem *** This file is supplied with VF package
  10. rem *** VF stands for "Vladi File Manager"
  11. rem *** VF -- ALL FEATURES YOU ALWAYS NEED IN *ONE* UTILITY
  12. rem *** FSX CAN BE FREELY DISTRIBUTED (incl. UPLOAD TO ANY BBS)
  13. rem ──────────────────────────────────────
  14. rem *** PLEASE DO NOT MODIFY THIS FILE ***
  15. rem ──────────────────────────────────────
  16.  
  17. iff x%1==x then
  18. text
  19. ───────────────────────────────────────────────────────────
  20. FSX Archive Abstraction Layer BTM by (c) Vladi BS Cade 1995
  21. ───────────────────────────────────────────────────────────
  22. Usage: fsx[.btm] command archive.ext parameters
  23. commands:
  24.   E  -- extract w/o path
  25.   X  -- extract with path
  26.   L  -- list contents
  27.   V  -- list contents (w/o using List)
  28.   T  -- test archive
  29.   A  -- add-to/create archive
  30.   EV -- extract multi-volume archive w/o path  (ARJ/RAR)
  31.   XV -- extract multi-volume archive with path (ARJ/RAR)
  32. "archive" is archive-name-WITH-ext (STH.UC2/etc...)
  33. "parameters" is optional parameters added after archivename
  34. supported archivers:
  35.   ARJ, UC2, ZIP, RAR, HA, AIN, LIMIT, LHA
  36. examples:
  37.   sx t *.*
  38.   for %a in (arj uc2 zip rar ha ain lim lzh) sx a try.%a
  39. ───────────────────────────────────────────────────────────
  40. endtext
  41. endiff
  42.  
  43. for %%a in (%2) do (
  44. rem   echos *** %@upper[%@ext[%a]] ...
  45.    set type=%@upper[%@ext[%a]]
  46.    set cmd=%@upper[%1]
  47.    if %type == ARJ  gosub arj
  48.    if %type == UC2  gosub uc
  49.    if %type == ZIP  gosub zip
  50.    if %type == RAR  gosub rar
  51.    if %type == HA   gosub ha
  52.    if %type == AIN  gosub ain
  53.    if %type == LIM  gosub lim
  54.    if %type == LZH  gosub lha
  55. )
  56.  
  57. quit 0
  58.  
  59. :arj
  60.     iff "%cmd" == "E" then call arj e %a %3&
  61. elseiff "%cmd" == "EV" then call arj e -v %a %3&
  62. elseiff "%cmd" == "L" then call arj l %a %3&|list /s
  63. elseiff "%cmd" == "V" then call arj l %a %3&
  64. elseiff "%cmd" == "X" then call arj x %a %3&
  65. elseiff "%cmd" == "XV" then call arj x -v %a %3&
  66. elseiff "%cmd" == "T" then call arj t %a %3&
  67. elseiff "%cmd" == "A" then call arj a %a %3&
  68. else (
  69.      echo *** WRONG COMMAND!
  70.      )
  71. endiff
  72. return
  73.  
  74. :uc
  75.     iff "%cmd" == "E" then call uc e  %a %3&
  76. elseiff "%cmd" == "L" then call uc v  %a %3&|list /s
  77. elseiff "%cmd" == "V" then call uc v  %a %3&
  78. elseiff "%cmd" == "X" then call uc es %a %3&
  79. elseiff "%cmd" == "T" then call uc t  %a %3&
  80. elseiff "%cmd" == "A" then call uc a  %a %3&
  81. else (
  82.      echo *** WRONG COMMAND!
  83.      )
  84. endiff
  85. return
  86.  
  87. :zip
  88.     iff "%cmd" == "E" then call pkunzip    %a %3&
  89. elseiff "%cmd" == "L" then call pkunzip -v %a %3&|list /s
  90. elseiff "%cmd" == "V" then call pkunzip -v %a %3&
  91. elseiff "%cmd" == "X" then call pkunzip -d %a %3&
  92. elseiff "%cmd" == "T" then call pkunzip -t %a %3&
  93. elseiff "%cmd" == "A" then call pkzip      %a %3&
  94. else (
  95.      echo *** WRONG COMMAND!
  96.      )
  97. endiff
  98. return
  99.  
  100. :rar
  101.     iff "%cmd" == "E" then call rar e  -std %a %3&
  102. elseiff "%cmd" == "EV" then call rar e  -v -std %a %3&
  103. elseiff "%cmd" == "L" then call rar v  -std %a %3&|list /s
  104. elseiff "%cmd" == "V" then call rar v  -std %a %3&
  105. elseiff "%cmd" == "X" then call rar x  -std %a %3&
  106. elseiff "%cmd" == "XV" then call rar x  -v -std %a %3&
  107. elseiff "%cmd" == "T" then call rar t  -std %a %3&
  108. elseiff "%cmd" == "A" then call rar a  -std %a %3&
  109. else (
  110.      echo *** WRONG COMMAND!
  111.      )
  112. endiff
  113. return
  114.  
  115. :ha
  116.     iff "%cmd" == "E" then call ha e  %a %3&
  117. elseiff "%cmd" == "L" then call ha l  %a %3&|list /s
  118. elseiff "%cmd" == "V" then call ha l  %a %3&
  119. elseiff "%cmd" == "X" then call ha x  %a %3&
  120. elseiff "%cmd" == "T" then call ha t  %a %3&
  121. elseiff "%cmd" == "A" then call ha a  %a %3&
  122. else (
  123.      echo *** WRONG COMMAND!
  124.      )
  125. endiff
  126. return
  127.  
  128. :ain
  129.     iff "%cmd" == "E" then call ain e  %a %3&
  130. elseiff "%cmd" == "L" then call ain l  %a %3&|list /s
  131. elseiff "%cmd" == "V" then call ain l  %a %3&
  132. elseiff "%cmd" == "X" then call ain x  %a %3&
  133. elseiff "%cmd" == "T" then call ain t  %a %3&
  134. elseiff "%cmd" == "A" then call ain a  %a %3&
  135. else (
  136.      echo *** WRONG COMMAND!
  137.      )
  138. endiff
  139. return
  140.  
  141. :lim
  142.     iff "%cmd" == "E" then call limit e  %a %3&
  143. elseiff "%cmd" == "L" then call limit l  %a %3&|list /s
  144. elseiff "%cmd" == "V" then call limit l  %a %3&
  145. elseiff "%cmd" == "X" then call limit e -p  %a %3&
  146. elseiff "%cmd" == "T" then call limit t  %a %3&
  147. elseiff "%cmd" == "A" then call limit a  %a %3&
  148. else (
  149.      echo *** WRONG COMMAND!
  150.      )
  151. endiff
  152. return
  153.  
  154. :lha
  155.     iff "%cmd" == "E" then call lha e  %a %3&
  156. elseiff "%cmd" == "L" then call lha l  %a %3&|list /s
  157. elseiff "%cmd" == "V" then call lha l  %a %3&
  158. elseiff "%cmd" == "X" then call lha x  %a %3&
  159. elseiff "%cmd" == "T" then call lha t  %a %3&
  160. elseiff "%cmd" == "A" then call lha a  %a %3&
  161. else (
  162.      echo *** WRONG COMMAND!
  163.      )
  164. endiff
  165. return
  166.  
  167. rem In case FSX is renamed to BAT
  168. :err4
  169. echo *** FSX needs 4DOS!
  170.  
  171.